/*
 * activitymy.cpp
 *
 *  Created on: Jul 22, 2010
 *      Author: nintang
 */

#include "activitymy.h"

activitymy::activitymy(QWidget *parent)
    : QWidget(parent)
{
	//setWindowFlags(Qt::WindowSoftkeysVisibleHint);
	QLabel *labelActivityMy=new QLabel(this);
	labelActivityMy->setGeometry(QRect(0,0, 360, 53));
	labelActivityMy->setStyleSheet("background-image: url(:/images/40.png);");
	this->setStyleSheet("QTabWidget::pane { border:0px;}"
			"QTabBar::tab { background-image:url(:/images/28.png); border-bottom: 0px ;  width:180px; height:50px; color: black; font:bold 20px;}"
			"QTabBar::tab:selected { background-image:url(:/images/27.png); border-style: none ;}");			
	QTabWidget *tabWidget=new QTabWidget(this);
	tabWidget->setFocusPolicy(Qt::NoFocus);
	tabWidget->setGeometry(QRect(0, 54, 360, 526));
	QWidget *tab1=new QWidget();
	QWidget *tab2=new QWidget();
	tabWidget->addTab(tab1,QString());
	tabWidget->addTab(tab2,QString());
	tabWidget->setTabText(tabWidget->indexOf(tab1), QApplication::translate("activitymy", "\346\210\221\345\217\202\345\212\240\347\232\204", 0, QApplication::UnicodeUTF8));
	tabWidget->setTabText(tabWidget->indexOf(tab2), QApplication::translate("activitymy", "\346\210\221\345\217\221\350\265\267\347\232\204", 0, QApplication::UnicodeUTF8));
	QListWidget *listWidget=new QListWidget(tab1);
	listWidget->setStyleSheet("border-style:none;");
	listWidget->setFixedWidth(360);
	listWidget->setMinimumHeight(478);
	listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	listWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
	QListWidgetItem *listitem1=new QListWidgetItem(listWidget);
	listitem1->setSizeHint(QSize(360,140)); 
	activitylist *activitylist1=new activitylist(1,0);
	listWidget->setItemWidget(listitem1,activitylist1);
	QListWidgetItem *listitem2=new QListWidgetItem(listWidget);
	listitem2->setSizeHint(QSize(360,140)); 
	activitylist *activitylist2=new activitylist(2,0);
	listWidget->setItemWidget(listitem2,activitylist2);	
	QListWidgetItem *listitem3=new QListWidgetItem(listWidget);
	listitem3->setSizeHint(QSize(360,140)); 
	activitylist *activitylist3=new activitylist(3,0);
	listWidget->setItemWidget(listitem3,activitylist3);
	QListWidgetItem *listitem4=new QListWidgetItem(listWidget);
	listitem4->setSizeHint(QSize(360,140)); 
	activitylist *activitylist4=new activitylist(4,0);
	listWidget->setItemWidget(listitem4,activitylist4);	
	QListWidgetItem *listitem5=new QListWidgetItem(listWidget);
	listitem5->setSizeHint(QSize(360,140)); 
	activitylist *activitylist5=new activitylist(5,0);
	listWidget->setItemWidget(listitem5,activitylist5);	
	QListWidgetItem *listitem6=new QListWidgetItem(listWidget);
	listitem6->setSizeHint(QSize(360,140)); 
	activitylist *activitylist6=new activitylist(6,0);
	listWidget->setItemWidget(listitem6,activitylist6);	
	
	QListWidget *listWidget2=new QListWidget(tab2);
	listWidget2->setStyleSheet("border-style:none;");
	listWidget2->setFixedWidth(360);
	listWidget2->setMinimumHeight(478);
	listWidget2->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	listWidget2->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
	QListWidgetItem *listitem21=new QListWidgetItem(listWidget2);
	listitem21->setSizeHint(QSize(360,140)); 
	activitylist *activitylist21=new activitylist(1,0);
	listWidget2->setItemWidget(listitem21,activitylist21);	
	QListWidgetItem *listitem22=new QListWidgetItem(listWidget2);
	listitem22->setSizeHint(QSize(360,140)); 
	activitylist *activitylist22=new activitylist(2,0);
	listWidget2->setItemWidget(listitem22,activitylist22);
	QListWidgetItem *listitem23=new QListWidgetItem(listWidget2);
	listitem23->setSizeHint(QSize(360,140)); 
	activitylist *activitylist23=new activitylist(3,0);
	listWidget2->setItemWidget(listitem23,activitylist23);
	QListWidgetItem *listitem24=new QListWidgetItem(listWidget2);
	listitem24->setSizeHint(QSize(360,140)); 
	activitylist *activitylist24=new activitylist(4,0);
	listWidget2->setItemWidget(listitem24,activitylist24);
	
	//back = new QAction(tr("Back"), this);
	//back->setSoftKeyRole(QAction::NegativeSoftKey);
	//connect(back, SIGNAL(triggered()), this, SLOT(backtobloghomepage()));
	//addAction(back);		
	QPushButton *pushButtonRight=new QPushButton(this);
	pushButtonRight->setGeometry(QRect(0, 580, 180, 60));	
	pushButtonRight->setStyleSheet("border-image:url(:/images/56.png);border:0px;");
	QPushButton *pushButtonLeft=new QPushButton(this);
	pushButtonLeft->setGeometry(QRect(180, 580, 180, 60));	
	pushButtonLeft->setStyleSheet("border-image:url(:/images/57.png);border:0px;");
	connect(pushButtonLeft, SIGNAL(clicked()), this, SLOT(backtobloghomepage()));		
}

activitymy::~activitymy()
{

}
void activitymy::backtobloghomepage()
{
    bloghomepage *w=new bloghomepage(2,0);
    w->showFullScreen(); 
    this->~activitymy();
}

